// components/song-menu-area/index.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    title: {
      type: String,
      value: "标题"
    },
    songMenuList: {
      type: Array,
      value: []
    }
  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    handleSongClick(event) {
      const id = event.currentTarget.dataset.item.id
      wx.navigateTo({
        url: `/packageDetail/pages/detail-songs/index?id=${id}&type=menu`,
      })

    },

    handleMoreClick() {
      let type = null;
      if (this.properties.title === "热门歌单") {
        type = 'hot'
      }
      if (this.properties.title === "推荐歌单") {
        type = "recommend"
      }
      wx.navigateTo({
        url: `/pages/song-playlist/index?type=${type}`,
      })
    }
  }
})